Add T: PartialEq bounds to derived StructuralPartialEq impls.#156807
Add T: PartialEq bounds to derived StructuralPartialEq impls.#156807kpreid wants to merge 1 commit into
T: PartialEq bounds to derived StructuralPartialEq impls.#156807Conversation
|
This PR is probably less correct than the just-posted #156809, because the documentation of Currently waiting on an answer to my question about a route to to fixing the diagnostics. |
This comment has been minimized.
This comment has been minimized.
|
Adding const X: Option<Box<()>> = None;
fn main() {
if let X = X {}
} |
|
Relevant documentation: https://doc.rust-lang.org/nightly/reference/patterns.html#r-patterns.const The Instead, the |
Fixes #147714.
Currently has a severe regression in diagnostic quality — suggesting
derive(PartialEq)on the type that already has that derive — apparently because the diagnostic logic effectively checks whetherStructuralPartialEqexists as a proxy for whether the type has the derive. I don’t yet know how to solve that problem.This is a breaking change to fix a bug, so it will need a crater run if it is to be done at all.